package com.miaoxun.dao.provider;

import org.apache.ibatis.jdbc.SQL;

public class DeptProvider {
    public String count(Long parentId) {
        return "select Count(*) from dept" + " where parent_id=" + parentId;
    }

    public String checkDeptHasUser(Long parentId) {

        return new SQL().FROM("user").SELECT("count(*)")
                .WHERE("dept_id=" + parentId).toString();
    }
}
